﻿<UserControl xmlns:igCA="clr-namespace:Infragistics.Windows.Chart;assembly=InfragisticsWPF4.Chart.v10.3"  x:Class="ViewTriangleStandard"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Vivei.Tools.Modules.Provisionnement" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Name="MainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="5" />
            <RowDefinition Height="*" />
            <!--<RowDefinition Height="5" />
            <RowDefinition Height="Auto" />-->
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <ComboBox MinWidth="100" Background="White"  Margin="5"/>
            <StackPanel Orientation="Horizontal" Grid.Column="1">
                <TextBlock VerticalAlignment="Center"  Text="Max Survenance" Margin="5" />
                <ComboBox Name="MaxSurvenanceComboBox"  VerticalAlignment="Center" Margin="5" Background="White" MinWidth="50"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Column="2">
                <TextBlock VerticalAlignment="Center"  Text="Min Deroulement" Margin="5" />
                <ComboBox Name="MinDeroulementComboBox" VerticalAlignment="Center"  Margin="5" Background="White" MinWidth="50"/>
            </StackPanel>
            <Button Grid.Column="3"  Background="White" Margin="5" Padding="5" Name="Button1" />
        </Grid>
        <ListBox Name="MainTriangleListBox" HorizontalContentAlignment="Right"  Grid.Row="1" SelectionMode="Multiple" ItemsSource="{Binding Data}" DisplayMemberPath="Value" >
            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="Grid.Row" Value="{Binding Row}" />
                    <Setter Property="Grid.Column" Value="{Binding Column}" />
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="Padding" Value="2" />
                </Style>
            </ListBox.ItemContainerStyle>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <local:CustomGrid 
                        DataContext="{Binding RelativeSource={RelativeSource AncestorType=ListBox}, Path=DataContext}"
                        Rows="{Binding RowCount}"
                        Columns="{Binding ColumnCount}"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
        <local:SimpleDashboardZone Grid.Row="3" >
            <igCA:XamChart >
                <igCA:XamChart.Axes>
                    <igCA:Axis AxisType="PrimaryX" />
                    <igCA:Axis AxisType="PrimaryY" />
                </igCA:XamChart.Axes>
                <igCA:XamChart.Series>
                    <igCA:Series Name="CoeffTriangleSeries" DataMapping = "Value=Value" />
                </igCA:XamChart.Series>
            </igCA:XamChart>
        </local:SimpleDashboardZone>

        <!--<ListBox Name="CoeffTriangleListBox"  Grid.Row="3" SelectionMode="Multiple" ItemsSource="{Binding Data}" DisplayMemberPath="Value" >
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <local:CustomGrid 
                        DataContext="{Binding RelativeSource={RelativeSource AncestorType=ListBox}, Path=DataContext}"
                        Rows="{Binding RowCount}"
                        Columns="{Binding ColumnCount}"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="Grid.Row" Value="{Binding Row}" />
                    <Setter Property="Grid.Column" Value="{Binding Column}" />
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>-->
        <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Name="MainGridSplitter" />
        <!--<GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="4" />
        <TabControl Grid.Row="5" >
            <TabItem Header="Scenarios">

            </TabItem>
            <TabItem Header="Options">

            </TabItem>
        </TabControl>-->
    </Grid>
</UserControl>
